<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="UTF-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<meta http-equiv="X-UA-Compatible" content="ie=edge" />
	<link rel="stylesheet" href="__HOME__/css/enter.css" />
	<script src="__HOME__/js/jquery.min.js"></script>
	<!--<script src="__HOME__/js/formyz.js"></script>-->
	

	<title>登录页</title>
</head>
<body>
	<div class="wrap">
		<div class="header">
			<div class="header-l">
				<a href="javascript:history.back(-1)">
					<img src="__HOME__/images/top_arrowleft.png" alt="" />
				</a>
			</div>
			<p>登录</p>
		</div>
		<div class="row clearfix">
			<div class="info clearfix">
				<form method="post" action="{:url('mine')}" id="form1">
					<input id="nickname" class="phone" type="" name="nickname" required="required" value="" placeholder="请输入用户名/手机号" />
					<input id="password" class="mima" type="password" name="password" required="required" value="" placeholder="请输入密码" />
				
				</form>
				
					<input id="submitBtn" class="btn" type="submit" value="立即登录" />
					<a class="zhuche" href="{:url('zhuche')}">没有账号？立即注册</a>
					<div id="xuan" class="xuan">
						<span>
							<input class="check" type="checkbox" id="remerber" checked="" class="check">自动登录
						</span>
						<a href="#">忘记密码</a>
					</div>
			</div>
		</div>
	</div>
</body>
<script type="text/javascript" src="__HOME__/layer/layer.js"></script>
<script> 	 

$(function(){

	
	 $('#submitBtn').click(function(){
	
	 	var url="{:url('mine')}";
         if(!$('#nickname').val()){
         	layer.msg("用户名不能为空");
         	return
         }
          if(!$('#password').val()){
         	layer.msg("密码不能为空");
         	return
         }
         
         
       
	 	$.post(url,{
	 		nickname:$('#nickname').val(),
	 		password:$('#password').val()
	 	},function(res){
	 		  
	 		 if (res.code > 0) {
                layer.msg(res.msg,{}, function () {
                            location.href = res.url;
                        });
                    } else {
                        layer.msg(res.msg);
                    }
	 	})
	 	
	 })
	
	
})
</script>
</html>